/*
 * @Author: wangyongcun@persagy.com
 * @Date: 2025-03-02 11:35:37
 * @LastEditTime: 2025-03-22 18:42:52
 * @FilePath: \vite-admin\src\main.ts
 * @Description:
 *
 */
import { createApp } from 'vue'
import App from './App.vue'

// 引入样式
import 'virtual:uno.css' // 引入 unocss 样式
import './styles/index.css'; // 引入全局样式
import 'element-plus/theme-chalk/display.css' // 引入 element-plus 样式
import 'element-plus/theme-chalk/dark/css-vars.css' // 引入 element-plus 暗黑主题样式

//引入插件
import {
  setupNProgress,
  setupIcon,
  unmountGlobalLoading
} from './plugins';

//  状态管理
import { setupStore } from "./store";

// 引入路由
import { setupRouter } from "./router";

// setupApp
async function setupApp() {
  setupNProgress();
  const app = createApp(App);
  setupIcon(app);
  setupStore(app);
  await setupRouter(app);
  app.mount('#app');
  unmountGlobalLoading();
}

setupApp();

